Dynamic routing of audio among multiple audio devices

ABSTRACT

A routing screen is presented on an electronic device by a user interface application in response to receiving a notification that an external audio device is connected to the electronic device. The routing screen displays representations of an internal audio device and the external audio device. In one aspect, the representations are buttons. In another aspect, the representations are entries in a list. If a user selects one of representations, the user interface application causes the audio signals to be routed to the audio device represented by the selection. An application control screen having a set of objects that represent functions for an audio application may also be displayed. One of the objects on the application control screen is modified in response status changes in the external audio device. A user may select this object to access the routing screen when the external audio device is connected.

BACKGROUND OF THE INVENTION

The present inventions relate in general to routing audio signals in anelectronic device and in particular to routing audio signals amongmultiple audio devices.

Electronic devices, such as computer systems or wireless cellulartelephones or other data processing systems, may often be used withperipheral devices. A peripheral device, such as a wired or wirelessheadset or a wireless or wired keyboard or a wired or wireless cursorcontrol device, is coupled to the electronic device which may bereferred to as a host system. The peripheral typically provides inputand/or output capabilities to the electronic device.

The peripheral may also be configured to operate with only oneparticular electronic device or host. For example, a wireless headsetperipheral may be paired with a designated wireless cellular telephoneso that it communicates with that designated wireless cellular telephonerather than other wireless cellular telephones which are within radiorange of the wireless headset. This allows a user to operate thewireless headset with its designated wireless cellular telephone eventhough it may be surrounded by other wireless cellular telephones whichare within the radio range of the wireless headset. Thus, the wirelessheadset in this case includes some intelligence or data which allows itto selectively operate with a designated host system, but there is nofurther processing or sensing capability in the wireless headset. ABluetooth pairing or partnership is an example of a relationship createdbetween a peripheral and a host. It is created by the user in order toexchange information in a secure manner. Creating a Bluetoothpartnership between two devices involves entering the same personalidentification number (PIN) or passkey on both devices; creating such apartnership is a one-time process. Once a partnership is created, thedevices can recognize the partnership and exchange information withoutentering a PIN again.

Routing audio signals in an electronic device having only two internalaudio devices, such as an earpiece and a speaker, requires switchingbetween the two devices. However, if the electronic device also isconnected to an audio peripheral, the routing of audio signals becomesambiguous. Thus, the electronic device should determine how to routeaudio signals among the multiple audio devices. Typically, the routingchoice is left to the user. However, prior art electronic devices do notallow the user to easily select an audio device when an audioapplication is initiated. Moreover, prior art electronic devices do notallow the user to easily select a newly connected audio peripheral whilean audio application is executing.

SUMMARY OF THE DESCRIPTION

A routing screen is presented on an electronic device, such as acommunications device, by a user interface application in response toreceiving a notification that an external audio device is connected tothe electronic device. The routing screen displays representations of aninternal audio device and the external audio device. In one aspect, therepresentations are buttons. In another aspect, the representations areentries in a list. If a user selects one of representations, the userinterface application causes the audio signals to be routed to the audiodevice represented by the selection. An application control screenhaving a set of objects, such as buttons, that represent functions foran audio application may also be displayed. One of the objects on theapplication control screen is modified in response status changes in theexternal audio device. A user may select this object to access therouting screen when the external audio device is connected. In oneaspect, the routing screen is presented if an external device isconnected during execution of an audio application. In another aspect,the application control screen is presented if an audio application isinitiated by an audio device.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example and notlimitation in the figures of the accompanying drawings in which likereferences indicate similar elements.

FIG. 1 shows an example of a system which includes an example of aperipheral and an example of a data processing system which is used withthe peripheral.

FIG. 2A is a flow chart of an embodiment of a method of the inventionsdescribed herein.

FIG. 2B is a flow chart of a specific embodiment of a method of theinventions described herein.

FIG. 3A shows, in table form, an example of how sensor data from aproximity sensor on a wireless headset and sensor data from a proximitysensor on a wireless mobile cellular telephone are used together tomodify an audio configuration setting on both the telephone and theheadset.

FIG. 3B shows a view of a user in a motor vehicle with a peripheral(e.g. a wireless headset), a data processing system (e.g. a wirelessmobile cellular telephone) and a ear adapter; in this view, the user iswearing the peripheral.

FIG. 3C shows another view of the user of FIG. 3B in the motor vehicle;in this view, the user is not wearing the peripheral and is not holdingthe data processing system.

FIG. 4A is a perspective view of a portable data processing systemaccordance with one embodiment of the inventions described herein.

FIG. 4B is a perspective view of a portable data processing system inaccordance with one embodiment of the inventions described herein.

FIG. 4C is a perspective view of a portable data processing system in afirst configuration (e.g. in an opened configuration) in accordance withone embodiment of the inventions described herein.

FIG. 4D is a perspective view of a portable data processing system in asecond configuration (e.g. in a closed configuration) in accordance withone embodiment of the inventions described herein.

FIG. 5 is a block diagram of a data processing system in whichembodiments of the inventions can be implemented.

FIG. 6 is a schematic side view of a proximity sensor in accordance withone embodiment of the inventions described herein.

FIG. 7 is a schematic side view of an alternative proximity sensor inaccordance with one embodiment of the inventions described herein.

FIG. 8 is a block diagram showing how data from sensors are used asinputs to a process, such as an artificial intelligence process (orother logical process), which in turn produce actions, such as changingone or more configuration settings of a device.

FIGS. 9A, 9B and 9C are views of user activities in accordance withembodiments of the inventions described herein.

FIG. 10 shows, in block diagram form, an example of a data processingsystem which may be used with one or more embodiments described herein.

FIG. 11 shows, in block diagram form, a data processing system with twoperipherals and a dock or other connector which couples the peripheralsto the data processing system.

FIG. 12 is a flow chart which illustrates an embodiment of a method ofthe inventions described herein.

FIG. 13 is a flow chart which illustrates an embodiment of a method ofthe inventions described herein.

FIG. 14 is a flow chart which shows an embodiment of a method of theinventions described herein.

FIG. 15 is a flow chart showing another method.

FIG. 16 shows an example of a user interface which may be used to setconfiguration or preference settings for a telephone, such as a wirelesscellular telephone.

FIGS. 17A and 17B illustrate embodiments of an application controlscreen displayed on a data processing system.

FIGS. 17C and 17D illustrate embodiment of a routing menu screendisplayed in response to user input on the application control screen ofFIG. 17B.

FIG. 18 illustrates an embodiment of a user interface application thatpresents the screens of FIGS. 17A-D and interacts with other componentsto route audio among multiple peripherals.

FIGS. 19, 20 and 21 are flowcharts illustrating methods performed by theembodiment of the user interface application shown in FIG. 18.

DETAILED DESCRIPTION

Various embodiments and aspects of the inventions will be described withreference to details discussed below, and the accompanying drawings willillustrate the various embodiments. The following description anddrawings are illustrative of the invention and are not to be construedas limiting the invention. Numerous specific details are described toprovide a thorough understanding of various embodiments of the presentinvention. However, in certain instances, well-known or conventionaldetails are not described in order to provide a concise discussion ofembodiments of the present inventions.

Some portions of the detailed descriptions which follow are presented interms of algorithms which include operations on data stored within acomputer memory. An algorithm is generally a self-consistent sequence ofoperations leading to a desired result. The operations typically requireor involve physical manipulations of physical quantities. Usually,though not necessarily, these quantities take the form of electrical ormagnetic signals capable of being stored, transferred, combined,compared, and otherwise manipulated. It has proven convenient at times,principally for reasons of common usage, to refer to these signals asbits, values, elements, symbols, characters, terms, numbers, or thelike.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the following discussion,it is appreciated that throughout the description, discussions utilizingterms such as “processing” or “computing” or “calculating” or“determining” or “displaying” or the like, can refer to the action andprocesses of a data processing system, or similar electronic device,that manipulates and transforms data represented as physical(electronic) quantities within the system's registers and memories intoother data similarly represented as physical quantities within thesystem's memories or registers or other such information storage,transmission or display devices.

The present invention can relate to an apparatus for performing one ormore of the operations described herein. This apparatus may be speciallyconstructed for the required purposes, or it may comprise a generalpurpose computer selectively activated or reconfigured by a computerprogram stored in the computer. Such a computer program may includeinstructions for performing the operations described herein and may bestored in a machine (e.g. computer) readable storage medium, such as,but is not limited to, any type of disk including floppy disks, opticaldisks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs),random access memories (RAMs), erasable programmable ROMs (EPROMs),electrically erasable programmable ROMs (EEPROMs), magnetic or opticalcards, or any type of media suitable for storing electronicinstructions, and each coupled to a bus.

A computer-readable (machine-readable) medium includes any mechanism forstoring or transmitting information in a form readable by a machine(e.g., a computer). For example, a machine-readable medium includes readonly memory (“ROM”); random access memory (“RAM”); magnetic disk storagemedia; optical storage media; flash memory devices; electrical, optical,acoustical or other form of propagated signals (e.g., carrier waves,infrared signals, digital signals, etc.); etc.

FIG. 1 shows an example of a system 200 which includes a peripheral 201,which may also be referred to as an accessory, and a data processingsystem 203 which is designed to exchange data with the peripheral 201.In the example of FIG. 1, the peripheral 201 may be a wireless headsetwhich communicates with the data processing system 203 through awireless personal area network (WPAN) interface, such as a Bluetoothinterface, and the data processing system 203 may be a wireless mobilecellular telephone or a personal digital assistant (PDA) which alsoincludes a wireless mobile cellular telephone or a general purposecomputer system, such as a handheld computer which includes a wirelessmobile cellular telephone. It will be appreciated that while aparticular type of peripheral and a particular type of data processingsystem are shown in FIG. 1, other types of peripherals and dataprocessing systems may be used in alternative embodiments. For example,in alternative embodiments, a peripheral may be a wired headset or awired or wireless keyboard or a wired or wireless cursor control deviceor other wired or wireless input or output devices; in other cases, theperipheral may be considered to be a data processing device which issimilar to a PDA or cellular telephone or general purpose computersystem. In alternative embodiments, the data processing system may be ageneral purpose computer system, or special purpose computer system, oran entertainment system, or a PDA or an embedded device within anotherdevice, or a media player, etc. The peripheral 201 includes a peripheralprocessor 205 which is coupled to one or more sensors 211, an audiotransducer 213 (which may be a speaker), a microphone 209, and awireless transceiver 207. The peripheral processor 205 controls theoperation of peripheral 201 by operating the wireless transceiver 207,which may be, for example, a Bluetooth or WiFi transceiver or othertypes of transceivers used to create a wireless local area network(WLAN) or a WPAN, and by operating the microphone 209 and the audiotransducer 213, in response to signals from the wireless transceiverand/or the sensors and/or processes executing on the peripheralprocessor 205. The peripheral processor 205 may be coupled to audiocodecs (not shown) or other devices to drive or receive input from theaudio transducer and the microphone respectively. In the case whereperipheral 201 is a wireless headset for a telephone, the wirelesstransceiver 207 establishes a wireless communication link with atelephone which acts as a host data processing system and which sendsaudio data to be played by the speaker (audio transducer 213) and whichreceives audio data from the microphone 209. Thus, the wireless headsetacts in the same manner as a wired headset on a telephone. The sensors211 may be one or more sensors on the peripheral 201 which are designedto detect or measure user activity or a device context. The sensors 211may include, for example, a proximity sensor and/or an ambient lightsensor and/or an accelerometer and/or other sensors described herein.The sensor(s) 211 provides sensor data (e.g. proximity data) to theperipheral processor 205 which may process this data or may transmit, asdescribed below, the sensor data to the data processing system forprocessing.

The data processing system 203 includes a processing system 221, such asa set of one or more microprocessors, which is coupled to a wirelessmobile telephony transceiver 223; the wireless mobile telephonytransceiver 223 may be a wireless mobile cellular telephone transceiverwhich is, to at least some extent, controlled by the processing system221. In one embodiment, the data processing system 203 may be a handheldPDA or handheld general purpose computer which includes a wirelesscellular telephone. In this case, the RF circuitry needed for thewireless cellular telephone may be provided by the wireless mobiletelephony transceiver 223. The data processing system 203 also includesone or more sensors 227, memory 229, I/O devices 231 and at least oneadditional wireless transceiver 225, each of which are coupled to theprocessing system 221. The processing system 221 may include a set ofone or more microprocessors which are coupled to the rest of the dataprocessing system 203 through one or more buses. The one or more sensors227 may be located on the data processing system 203 and may be designedto detect or measure user activity or a device context as explainedfurther below. The one or more sensors 227 may include, for example, aproximity sensor and/or an ambient light sensor and/or an accelerometerand/or other sensors described herein. The sensor data from these one ormore sensors 227 is provided to the processing system 221 which mayprocess this data or may transmit this sensor data to the peripheral forprocessing, as described herein, or both of the peripheral and theprocessing system 221 may process the sensor data. The I/O(input/output) devices 231 may include one or more of (a) a keyboard;(b) a touch input panel; (c) a cursor control device (such as, e.g., ajoystick or trackpad); (d) speaker; (e) microphone; (f) buttons (suchas, e.g., “send” and “end” or other buttons for a cellular telephone);(g) a display device; and (h) other known input/output devices. In oneembodiment, a touch input panel may be integrated with a display deviceto provide both input and output capabilities on the same surface of thedisplay device; this is described further below. These I/O devices allowa user to enter instructions or commands or data to the processingsystem 221 to cause the system to operate in a manner desired by theuser. The memory 229 may be any combination of DRAM or flash memory orother types of memory including, for example, a magnetic hard drive, andthe memory 229 may be coupled to the processing system through one ormore memory controllers; the memory 229 may store computer programinstructions, including a computer operation system (OS) and userapplication programs, such as, for example, a web browser application,an email application, a calendar program, an address book application,and other possible applications. The memory 229 may also store user datasuch as, for example, address and/or contact information, calendarinformation (e.g. events and tasks), bookmarks/favorites (e.g. “URLs”)and other user data (e.g. word processing documents, spreadsheets,presentations, etc.). The processing system 221 may retrieve and storecomputer program instructions and data from the memory 229 in order toallow the user to operate the data processing system 203. Moreover, thememory 229 may store music and/or other media for playback on the dataprocessing system 203, which can allow the user to display and selectmusic and/or other media for playback on a speaker (e.g. an earphone) ora wireless headset of a peripheral, such as peripheral 201. The wirelesstransceiver(s) 225 may include one or more wireless transceivers whichprovide wireless connectivity to other devices, such as the peripheral201 or a wireless network (e.g. a WiFi network or other wireless localarea networks (WLAN) or a wireless personal area network (WPAN), etc.).The wireless transceiver(s) 225 are coupled to the processing system 221to provide data to the data processing system 203. In one embodiment,the wireless transceiver(s) 225 include a Bluetooth complianttransceiver to couple wirelessly the data processing system 203 to theperipheral 201 and optionally other peripherals (e.g. a wirelesskeyboard) and a WiFi compliant transceiver (e.g. IEEE 802.11a/gcompliant transceiver) to wirelessly couple the system 203 to a wirelessnetwork and/or other devices. The peripheral 201 and the data processingsystem 203 may be paired together using known techniques, such as thetechniques described herein, to create a Bluetooth partnership. Thepairing may alternatively involve other techniques which register onedevice with another device to provide a secure, authenticatedcommunication channel between the peripheral 201 and the data processingsystem 203.

In one embodiment, the peripheral 201 and the data processing system 203may be capable of working together to determine a user's intent oractions or the system's context based on sensor data from at least onesensor on the peripheral 201 or the data processing system 203 or both.For example, a set of sensors, such as, for example, a proximity sensorand an ambient light sensor on the peripheral may provide data whichindicate that the peripheral is not proximate to the user, while anotherset of sensors on the host may provide data which indicate that the hostis near to the user's ear; in this situation, the peripheral and thehost may exchange data, such as data from the sensors and instructionswhich automatically cause a change in configuration of the peripheraland/or the host in response to the sensor data. If, in this example, theperipheral is a wireless headset and the host is a wireless cellulartelephone, then the peripheral may transmit its sensor data to the hostwhich processes this sensor data along with sensor data from the host todetermine that the user is holding the wireless cellular telephoneagainst the user's ear and the headset is not close to the user, andhence the host will automatically enable the host's speaker andmicrophone and will transmit an instruction to the headset to cause itto disable the headset's speaker and microphone.

FIG. 2A shows a general example of a method according to one embodimentof the inventions. In operation 250, data about the state of the dataprocessing system is obtained from at least one sensor which may be atthe host or at the peripheral or at both of the host and the peripheral.In operation 252, data about the state of the peripheral is obtainedfrom at least one sensor at the peripheral or at the host or fromsensors at both. It will be appreciated that, in at least certainembodiments, a method may omit operation 250 or may omit operation 252or may perform these operations in a different sequence than shown inFIG. 2A. In operation 254, a processing system determines whether tochange a configuration of the peripheral or the host or both based ondata from at least one of the sensors. As noted elsewhere, the host andthe peripheral may exchange sensor data to perform this determination,and one of the host or the peripheral or both may perform portions of orall of operation 254. Then in operation 256, the peripheral or the hostor both perform a change in configuration. This change in configurationmay involve disabling certain functionality in either the host or theperipheral or both or may involve enabling certain functionality in theperipheral or the host or both. For example, the change in configurationmay involve turning on or off an audio system (e.g. a speaker andmicrophone) or turning on or off a backlight of a display or other lightsource for a display, etc. It will be appreciated that the host referredto in FIG. 2A may be the data processing system 203 and the peripheralreferred to in FIG. 2A may be the peripheral 201 shown in FIG. 1.

FIG. 2B illustrates a particular method according to one embodiment ofthe inventions. Operation 261 involves obtaining sensor data fromsensors on the wireless headset which is a peripheral of a wirelessphone, such as a wireless cellular telephone. The wireless headsetreferred to in FIG. 2B may be the peripheral 201 and the wireless phonereferred to in FIG. 2B may be the data processing system 203. Thewireless headset may include one or more sensors, such as a proximitysensor and an ambient light sensor and a sound sensor, which are used toobtain sensor data which can be used to determine whether the headset isnear a user's ear. In operation 263, the wireless headset transmitssensor data obtained from its sensors to the wireless phone whichprocesses this sensor data together with sensor data from sensors on thewireless phone. The sensors on the wireless phone may include one ormore sensors such as a proximity sensor, an ambient light sensor, and anaccelerometer, all on the wireless phone. The wireless headset maytransmit this sensor data through a wireless personal area network(WPAN). In the example shown in FIG. 1, the wireless transceiver 207 maytransmit sensor data to the data processing system which is received bythe wireless transceiver 225. In one embodiment, the wirelesstransceiver 207 may be a Bluetooth compliant transceiver and thewireless transceiver 225 may also be a Bluetooth compliant transceiver.The sensor data from the wireless headset and the sensor data from thewireless phone are processed together to determine the state of theuser's use of the wireless headset and phone. In response to processingthis sensor data, the wireless phone in operation 265 automaticallyselects a configuration (such as, for example, switching off the speakerand microphone on the wireless phone and switching on the speaker andmicrophone of the wireless headset) for itself based on both groups ofsensor data and transmits an instruction to the wireless headset toselect a configuration, such as switching on the speaker and microphoneon the headset. This selection of a configuration occurs in response toprocessing of sensor data from sensors on both the wireless headset andthe wireless phone. It will be appreciated that there are numerousalternative implementations of the method shown in FIG. 2B. For example,the sensor data from the wireless phone may be transmitted to thewireless headset, which processes the sensor data from the wirelessphone and the sensor data from the wireless headset and determines howto set configurations on both the phone and the wireless headset andtransmits an instruction to the wireless phone to cause the wirelessphone to change its configuration.

FIG. 3A shows an example of how sensor data from a headset peripheraland sensor data from a data processing system which is a phone may causecertain actions for both the phone and the headset. The column labeled“Headset Proximity” shows a characterization of proximity sensor dataobtained from a proximity sensor on the headset. The column labeled“Phone Proximity” shows a characterization in three different instancesof proximity sensor data from a proximity sensor on the phone. Thecolumn labeled “Enable Audio On” shows the action taken automatically byboth the headset and the phone in response to the three differentinstances of sensor data. Instance 275 illustrates a case where theheadset is far from the user and the phone is close to the user. Thismay occur, for example, when the headset is placed on a table and thephone is in the user's hand. In this instance, the combined sensor data,optionally with other sensor data, is analyzed to determine that theaudio system on the headset should be disabled while the audio system onthe phone should be enabled, as shown in instance 275 of FIG. 3A. In thecase of the instance 277, sensor data from the proximity sensor on theheadset indicates that the headset is close to the user, while proximitysensor data from a proximity sensor on the phone indicates that thephone is far from the user. In this case the system, which includes theheadset and the phone, enables the audio system on the headset whiledisabling the audio system on the phone. In instance 279, sensor datafrom proximity sensors on the headset and the phone indicate that boththe headset and the phone are close to the user and in this case, thedefault action which may occur automatically is to enable the audio onthe headset while disabling the audio on the phone. Instance 279 mayrepresent a situation in which the user is holding the phone and theheadset is being worn by the user on the user's ear.

It will be appreciated that in one embodiment, if both devices detectthe user, then they attempt to decide which should take priority. Othersensors may be used in performing this operation. For example, a soundsensor may reveal that the user is talking into the wireless headset andnot talking into the phone based upon the sound intensity from the twodevices. Accelerometers may also be used to provide motion andorientation data for one or both of the devices in order to assist indeciding how to configure both the peripheral and the data processingsystem in response to context or user actions. For example, if bothdevices are on a table and one is picked up and the other is not, thenby using the data from the accelerometers indicating which one was notpicked up, the system may cause the device not picked up to be disabled.For example, if the phone is left on the table and the wireless headsetis picked up, then the audio system of the phone is disabled and theaudio system of the wireless headset is enabled for a phone call orother communication. In certain embodiments, both audio systems of theperipheral and the data processing system may be enabled until theperipheral and the data processing system can decide which of the twodevices to disable.

FIGS. 3B and 3C show examples of how a data processing system, such as awireless cellular telephone, and a peripheral, such as a wirelessheadset which operates with the data processing system, may also operatewith another data processing system, such as an adapter device fixed toa motor vehicle, such as an automobile. In the examples shown in FIGS.3B and 3C, the user 303 is sitting in a car 301 which includes atelephone car adapter 307 which is designed to interoperate with thedata processing device 309 which may be a wireless cellular telephone.The data processing system 203 shown in FIG. 1 may be the dataprocessing system 309. The peripheral 305 is shown as being worn on theuser's ear in the case of FIG. 3B, and in the case of FIG. 3C, thewireless headset 305 is shown on the car's seat next to the user 303.The peripheral 201 shown in FIG. 1 may be the peripheral 305, which maybe a wireless headset. The telephone ear adapter 307 wirelesslycommunicates with the data processing system 309 such that the audio ofa phone call may be routed through the car's speakers and a microphonein the car rather than a microphone or speaker on the wireless headsetor on the wireless phone 309. The telephone car adapter 307 may alsoenable the user to play back media from the data processing system 309through the car's speakers. For example, if the data processing system309 includes a media player for playing songs, the telephone car adapter307 may be configured such that audio from the songs is played backthrough the ear's speakers by transmitting the audio from the dataprocessing system 309 to the telephone car adapter 307 which in turndrives the car's speakers. The user may set up the telephone car adapter307 so that it can be automatically configured to route audio to thecar's speakers in response to sensor data from sensors on one or both ofthe wireless headset 305 and the wireless telephone 309. In the case ofFIG. 3B, proximity sensors or other sensors on the wireless headset 305indicate that the user 303 is wearing the wireless headset. In thiscase, the sensor data from the wireless headset may be processed in thewireless headset or in the wireless telephone 309, and the result ofthis processing indicates that the audio system of the wireless headsetshould be enabled while disabling the audio system on the wirelesstelephone 309 and disabling the routing of audio to the car's speakers.In the case of FIG. 3C, sensors on one or both of the wireless headset305 and the wireless telephone 309 determine that neither device isclose to the user and in response causes audio to be routed to thetelephone car adapter 307 which in turn drives the car's speakers andalso enables the microphone of the car so that the user can use theaudio system of the car automatically in response to the sensors on oneor both of the wireless headset 305 and the wireless telephone 309,determining that neither device is close to the user.

At least certain embodiments of the present inventions include one ormore sensors on one or both of a peripheral or a data processing systemto monitor user activity or device context. At least certain embodimentsof the present inventions also may include automatically changing astate of the peripheral and/or the data processing system based on useractivity or the context of the peripheral and/or the data processingsystem. Such automatic changing may include, for example, automaticallychanging an audio setting or activating or deactivating a backlight of adisplay device of the portable device or setting an input device of theportable device to a particular state, based on certain predetermineduser activities.

At least certain embodiments of the inventions may include a digitalmedia player, such as a portable music and/or video media player, whichmay include a media processing system to present the media, a storagedevice to store the media and may further include a radio frequency (RF)transceiver (e.g., an RF transceiver for a cellular telephone) coupledwith an antenna system and the media processing system. In certainembodiments, media stored on a remote storage device may be transmittedto the media player through the RF transceiver. The media may be, forexample, one or more of music or other audio, still pictures, or motionpictures.

The portable media player may include a media selection device, such asa click wheel input device on an iPod® or iPod Nano® media player fromApple Computer, Inc. of Cupertino, Calif., a touch screen input device,pushbutton device, movable pointing input device or other input device.The media selection device may be used to select the media stored on thestorage device and/or the remote storage device. The portable mediaplayer may, in at least certain embodiments, include a display devicewhich is coupled to the media processing system to display titles orother indicators of media being selected through the input device andbeing presented, either through a speaker or earphone(s), or on thedisplay device, or on both display device and a speaker or earphone(s).Examples of a portable media player are described in published U.S.patent application numbers 2003/0095096 and 2004/0224638, both of whichare incorporated herein by reference.

Embodiments of the inventions described herein may be part of othertypes of data processing systems, such as, for example, entertainmentsystems or personal digital assistants (PDAs), or general purposecomputer systems, or special purpose computer systems, or an embeddeddevice within another device, or cellular telephones which do notinclude media players, or devices which combine aspects or functions ofthese devices (e.g., a media player, such as an iPod®, combined with aPDA, an entertainment system, and a cellular telephone in one portabledevice).

FIG. 4B illustrates a data processing system according to one embodimentof the invention; this data processing system of FIG. 4B may beimplemented as an embodiment of the data processing system 203 shown inFIG. 1, and may operate with a peripheral in a manner which is shown inFIG. 2A and is described relative to FIG. 2A. FIG. 4B shows a wirelessdevice in a telephone configuration having a “candy-bar”style. In FIG.4B, the wireless device 30 may include a housing 32, a display device34, an input device 36 which may be an alphanumeric keypad, a speaker38, a microphone 40 and an antenna 42. The wireless device 30 also mayinclude a proximity sensor 44 and an accelerometer 46. It will beappreciated that the embodiment of FIG. 4B may use more or fewer sensorsand may have a different form factor from the form factor shown in FIG.4B.

The display device 34 is shown positioned at an upper portion of thehousing 32, and the input device 36 is shown positioned at a lowerportion of the housing 32. The antenna 42 is shown extending from thehousing 32 at an upper portion of the housing 32. The speaker 38 is alsoshown at an upper portion of the housing 32 above the display device 34.The microphone 40 is shown at a lower portion of the housing 32, belowthe input device 36. It will be appreciated that the speaker 38 andmicrophone 40 can be positioned at any location on the housing, but aretypically positioned in accordance with a user's ear and mouth,respectively. The proximity sensor 44 is shown at or near the speaker 38and at least partially within the housing 32. The accelerometer 46 isshown at a lower portion of the housing 32 and within the housing 32. Itwill be appreciated that the particular locations of the above-describedfeatures may vary in alternative embodiments.

The display device 34 may be, for example, a liquid crystal display(LCD) which does not include the ability to accept inputs or a touchinput screen which also includes an LCD. The input device 36 mayinclude, for example, buttons, switches, dials, sliders, keys or keypad,navigation pad, touch pad, touch screen, and the like.

Any well-known speaker, microphone and antenna can be used for speaker38, microphone 40 and antenna 42, respectively.

The proximity sensor 44 may detect location (e.g. distance from thewireless device 30), direction, speed, etc. of objects relative to thewireless device 30. A location of an object relative to the wirelessdevice can be represented as a distance in at least certain embodiments.The proximity sensor may generate location or movement data or both,which may be used to determine the location of objects relative to theportable device 30 and/or proximity sensor 44. An example of a proximitysensor is shown in FIG. 6.

In addition, a processing device (not shown) is coupled to the proximitysensor(s) 44. The processing device may be used to determine thelocation of objects relative to the portable device 30 or proximitysensor 44 or both based on the location and/or movement data provided bythe proximity sensor 44. The proximity sensor may continuously orperiodically monitor the object location. The proximity sensor may alsobe able to determine the type of object it is detecting.

Additional information about proximity sensors can be found in U.S.patent application Ser. No. 11/241,839, titled “PROXIMITY DETECTOR INHANDHELD DEVICE,” and U.S. patent application Ser. No. 11/240,788,titled “PROXIMITY DETECTOR IN HANDHELD DEVICE;” U.S. patent applicationSer. No. 11/165,958, titled “METHODS AND APPARATUS FOR REMOTELYDETECTING PRESENCE,” filed Jun. 23, 2005; and U.S. Pat. No. 6,583,676,titled “PROXIMITY/TOUCH DETECTOR AND CALIBRATION CIRCUIT,” issued Jun.24, 2003, all of which are incorporated herein by reference in theirentirety.

According to one embodiment, the accelerometer 46 is able to detect amovement including an acceleration or de-acceleration of the wirelessdevice. The accelerometer 46 may generate movement data for multipledimensions, which may be used to determine a direction of movement ofthe wireless device. For example, the accelerometer 46 may generate X, Yand Z axis acceleration information when the accelerometer 46 detectsthat the portable device is moved. In one embodiment, the accelerometer46 may be implemented as described in U.S. Pat. No. 6,520,013, which isincorporated herein by reference in its entirety. Alternatively, theaccelerometer 46 may be a KGF01 accelerometer from Kionix or an ADXL311accelerometer from Analog Devices or other accelerometers which areknown in the art.

In addition, a processing device (not shown) is coupled to theaccelerometer(s) 46. The processing device may be used to calculate adirection of movement, also referred to as a movement vector of thewireless device 30. The movement vector may be determined according toone or more predetermined formulas based on the movement data (e.g.,movement in X, Y and Z) provided by accelerometer 46. The processingdevice may be integrated with the accelerometer 46 or integrated withother components, such as, for example, a chipset of a microprocessor,of the portable device.

The accelerometer 46 may continuously or periodically monitor themovement of the portable device. As a result, an orientation of theportable device prior to the movement and after the movement may bedetermined based on the movement data provided by the accelerometerattached to the portable device.

Additional information about accelerometers can be found in co-pendingU.S. patent application Ser. No. 10/986,730, filed Nov. 12, 2004, whichis hereby incorporated herein by reference in its entirety.

The data acquired from the proximity sensor 44 and the accelerometer 46can be combined together, or used alone, to gather information about theuser's activities. The data from the proximity sensor 44, theaccelerometer 46 or both can be used, for example, toactivate/deactivate a display backlight, initiate commands, makeselections, control scrolling or other movement in a display, controlinput device settings, or to make other changes to one or more settingsof the device.

FIG. 4A shows a portable device 50 in accordance with one embodiment ofthe invention. The portable device 50 may include a housing 52, adisplay/input device 54, a speaker 56, a microphone 58 and an optionalantenna 60 (which may be visible on the exterior of the housing or maybe concealed within the housing). The portable device 50 also mayinclude a proximity sensor 62 and an accelerometer 64 and optionallyother sensors (e.g. an ambient light sensor). The portable device 50 maybe a cellular telephone or a device which is an integrated PDA and acellular telephone or a device which is an integrated media player and acellular telephone or a device which is both an entertainment system(e.g. for playing games) and a cellular telephone, or the portabledevice 50 may be other types of devices described herein. In oneparticular embodiment, the portable device 50 may include a cellulartelephone and a media player and a general purpose computer, allcontained within the housing 52. The portable device 50 may beimplemented as an embodiment of the data processing system 203 shown inFIG. 1 and may operate with a peripheral in a manner which is shown inFIG. 2A and is described relative to FIG. 2A. The portable device 50 mayhave a form factor which is small enough that it fits within the hand ofa normal adult and is light enough that it can be carried in one hand byan adult. It will be appreciated that the term “portable” means thedevice can be easily held in an adult user's hands (one or both); forexample, a laptop computer and an iPod are portable devices.

In one embodiment, the display/input device 54 may include a multi-pointtouch input screen in addition to being a display, such as an LCD. Inone embodiment, the multi-point touch screen is a capacitive sensingmedium configured to detect multiple touches (e.g., blobs on the displayfrom a user's face or multiple fingers concurrently touching or nearlytouching the display) or near touches (e.g., Hobs on the display) thatoccur at the same time and at distinct locations in the plane of thetouch panel and to produce distinct signals representative of thelocation of the touches on the plane of the touch panel for each of themultiple touches. Additional information about multi-point input touchscreens can be found in co-pending U.S. patent application Ser. No.10/840,862, filed May 6, 2004 (see published U.S. patent application20060097991), which is incorporated herein by reference in its entirety.A multi-point input touch screen may also be referred to as amulti-touch input panel.

A processing device (not shown) may be coupled to the display/inputdevice 54. The processing device may be used to calculate touches on thetouch panel. The display/input device 54 can use the detected touch(e.g., blob or blobs from a user's face) data to, for example, identifythe location of certain objects and to also identify the type of objecttouching (or nearly touching) the display/input device 54.

The data acquired from the proximity sensor 62 and the display/inputdevice 54 can be combined to gather information about the user'sactivities as described herein. The data from the proximity sensor 62and the display/input device 54 can be used to change one or moresettings of the portable device 50, such as, for example, change anillumination setting of the display/input device 54.

In one embodiment, as shown in FIG. 4A, the display/input device 54occupies a large portion of one surface (e.g. the top surface) of thehousing 52 of the portable device 50. In one embodiment, thedisplay/input device 54 consumes substantially the entire front surfaceof the portable device 50. In another embodiment, the display/inputdevice 54 consumes, for example, at least 75% of a front surface of thehousing 52 of the portable device 50. In alternative embodiments, theportable device 50 may include a display which does not have inputcapabilities, but the display still occupies a large portion of onesurface of the portable device 50. In this case, the portable device 50may include other types of input devices such as a QWERTY keyboard orother types of keyboard which slide out or swing out from a portion ofthe portable device 50.

FIGS. 4C and 4D illustrate a portable device 70 according to oneembodiment of the invention. The portable device 70 may be implementedas an embodiment of the data processing system 203 shown in FIG. 1 andmay operate with a peripheral in a manner which is shown in FIG. 2A andis described relative to FIG. 2A. The portable device 70 may be acellular telephone which includes a hinge 87 that couples a displayhousing 89 to a keypad housing 91. The hinge 87 allows a user to openand close the cellular telephone so that it can be placed in at leastone of two different configurations shown in FIGS. 4C and 4D. In oneparticular embodiment, the hinge 87 may rotatably couple the displayhousing to the keypad housing. In particular, a user can open thecellular telephone to place it in the open configuration shown in FIG.4C and can close the cellular telephone to place it in the closedconfiguration shown in FIG. 4D. The keypad housing 91 may include akeypad 95 which receives inputs (e.g. telephone number inputs or otheralphanumeric inputs) from a user and a microphone 97 which receivesvoice input from the user. The display housing 89 may include, on itsinterior surface, a display 93 (e.g. an LCD) and a speaker 98 and aproximity sensor 84; on its exterior surface, the display housing 89 mayinclude a speaker 96, a temperature sensor 94, a display 88 (e.g.another LCD), an ambient light sensor 92, and a proximity sensor 84A.Hence, in this embodiment, the display housing 89 may include a firstproximity sensor on its interior surface and a second proximity sensoron its exterior surface. The first proximity sensor may be used todetect a user's head or ear being within a certain distance of the firstproximity sensor and to cause an illumination setting of displays 93 and88 to be changed automatically in response to this detecting (e.g. theillumination for both displays are turned off or otherwise set in areduced power state). Data from the second proximity sensor, along withdata from the ambient light sensor 92 and data from the temperaturesensor 94, may be used to detect that the cellular telephone has beenplaced into the user's pocket.

In at least certain embodiments, the portable device 70 may containcomponents which provide one or more of the functions of a wirelesscommunication device such as a cellular telephone, a media player, anentertainment system, a PDA, or other types of devices described herein.In one implementation of an embodiment, the portable device 70 may be acellular telephone integrated with a media player which plays MP3 files,such as MP3 music files.

Each of the devices shown in FIGS. 4A, 4B, 4C and 4D may be a wirelesscommunication device, such as a wireless cellular telephone, and mayinclude a plurality of components which provide a capability forwireless communication. FIG. 5 shows an embodiment of a wireless device100 which includes the capability for wireless communication. Thewireless device 100 may be included in any one of the devices shown inFIGS. 4A, 4B, 4C and 4D, although alternative embodiments of thosedevices of FIGS. 4A, 4B, 4C and 4D may include more or fewer componentsthan the wireless device 100. Furthermore, all or portions of wirelessdevice 100 may be implemented as part of data processing system 203, andwireless device 100 may operate with a peripheral in a manner which isdescribed herein relative to FIG. 2A.

Wireless device 100 may include an antenna system 101. Wireless device100 may also include a digital and/or analog radio frequency (RF)transceiver 102, coupled to the antenna system 101, to transmit and/orreceive voice, digital data and/or media signals through antenna system101.

Wireless device 100 may also include a digital processing system 103 tocontrol the digital RF transceiver and to manage the voice, digital dataand/or media signals. Digital processing system 103 may be a generalpurpose processing device, such as a microprocessor or controller forexample. Digital processing system 103 may also be a special purposeprocessing device, such as an ASIC (application specific integratedcircuit), FPGA (field-programmable gate array) or DSP (digital signalprocessor). Digital processing system 103 may also include otherdevices, as are known in the art, to interface with other components ofwireless device 100. For example, digital processing system 103 mayinclude analog-to-digital and digital-to-analog converters to interfacewith other components of wireless device 100. Digital processing system103 may include a media processing system 109, which may also include ageneral purpose or special purpose processing device to manage media,such as files of audio data.

Wireless device 100 may also include a storage device 104, coupled tothe digital processing system, to store data and/or operating programsfor the wireless device 100. Storage device 104 may be, for example, anytype of solid-state or magnetic memory device.

Wireless device 100 may also include one or more input devices 105,coupled to the digital processing system 103, to accept user inputs(e.g., telephone numbers, names, addresses, media selections, etc.)Input device 105 may be, for example, one or more of a keypad, atouchpad, a touch screen, a pointing device in combination with adisplay device or similar input device.

Wireless device 100 may also include at least one display device 106,coupled to the digital processing system 103, to display informationsuch as messages, telephone call information, contact information,pictures, movies and/or titles or other indicators of media beingselected via the input device 105. Display device 106 may be, forexample, an LCD display device. In one embodiment, display device 106and input device 105 may be integrated together in the same device(e.g., a touch screen LCD such as a multi-touch input panel which isintegrated with a display device, such as an LCD display device).Examples of a touch input panel and a display integrated together areshown in U.S. published application No. 20060097991. The display device106 may include a backlight 106 a to illuminate the display device 106under certain circumstances. It will be appreciated that the wirelessdevice 100 may include multiple displays.

Wireless device 100 may also include a battery 107 to supply operatingpower to components of the system including digital RF transceiver 102,digital processing system 103, storage device 104, input device 105,microphone 105A, audio transducer 108, media processing system 109,sensor(s) 110, and display device 106. Battery 107 may be, for example,a rechargeable or non-rechargeable lithium or nickel metal hydridebattery.

Wireless device 100 may also include audio transducers 108, which mayinclude one or more speakers, and at least one microphone 105A.

Wireless device 100 may also include one or more sensors 110 coupled tothe digital processing system 103. The sensor(s) 110 may include, forexample, one or more of a proximity sensor, accelerometer, touch inputpanel, ambient light sensor, ambient noise sensor, temperature sensor,gyroscope, a hinge detector, a position determination device, anorientation determination device, a motion sensor, a sound sensor, aradio frequency electromagnetic wave sensor, and other types of sensorsand combinations thereof. One or more of such sensors may also beincluded on a peripheral which is configured to operate with (e.g.exchange data with) the data processing system. Based on the dataacquired by the sensor(s) 110 and sensor(s) on a peripheral, variousresponses may be performed automatically by the data processing systemor the peripheral or both, such as, for example, activating ordeactivating the backlight 106 a, changing a setting of the input device105 (e.g. switching between processing or not processing, as anintentional user input, any input data from an input device), and otherresponses and combinations thereof.

In one embodiment, digital RF transceiver 102, digital processing system103 and/or storage device 104 may include one or more integratedcircuits disposed on a printed circuit board (PCB).

FIGS. 6 and 7 illustrate exemplary proximity sensors in accordance withembodiments of the invention. It will be appreciated that, inalternative embodiments, other types of proximity sensors, such ascapacitive sensors or sonar-like sensors, may be used rather than theproximity sensors shown in FIGS. 6 and 7. In FIG. 6, the proximitysensor 120 includes an emitter 122, a detector 124, and a window 126.The emitter 122 generates light in the infrared (IR) bands, and may be,for example, a Light Emitting Diode (LED). The detector 124 isconfigured to detect changes in light intensity and may be, for example,a phototransistor. The window 126 may be formed from translucent orsemi-translucent material. In one embodiment, the window 126 is anacoustic mesh, such as, for example, a mesh typically found with amicrophone or speaker of the portable device. In other embodiments, thewindow 126 may be MicroPerf, IR transparent strands wound in a mesh, ora cold mirror.

During operation, the light from the emitter 122 hits an object 128 andscatters when the object is present above the window 126. The light fromthe emitter may be emitted in square wave pulses which have a knownfrequency, thereby allowing the detector 124 to distinguish betweenambient light and light from emitter 122 which is reflected by anobject, such as the user's head or ear or a material in a user's pocket,back to the detector 124. At least a portion of the scattered light isreflected towards the detector 124. The increase in light intensity isdetected by the detector 124, and this is interpreted by a processingsystem (not shown in FIG. 6) to mean an object is present within a shortdistance of the detector 124. If no object is present or the object isbeyond a certain distance from the detector 124, an insufficient orsmaller amount of the emitted light is reflected back towards thedetector 124, and this is interpreted by the processing system (notshown in FIG. 6) to mean that an object is not present or is at arelatively large distance. In each case, the proximity sensor ismeasuring the intensity of reflected light which is related to thedistance between the object which reflects the light and detector 124.

In one embodiment, the emitter 122 and detector 124 are disposed withinthe housing of a portable device, such as those described above withreference to FIGS. 4A-4D.

In FIG. 7, the emitter 122 and detector 124 of the proximity sensor areangled inward towards one another to improve detection of the reflectedlight, but the proximity sensor of FIG. 7 otherwise operates in a mannersimilar to the proximity sensor of FIG. 6.

It will be appreciated that at least some of the sensors which are usedwith embodiments of the inventions may determine or provide data whichrepresents an analog value. In other words, the data represents a valuewhich can be any one of a set of possible values which can varycontinuously or substantially continuously, rather than being discretevalues which have quantum, discrete jumps from one value to the nextvalue. Further, the value represented by the data may not bepredetermined. For example, in the case of a distance measured by aproximity sensor, the distance is not predetermined, unlike values ofkeys on a keypad which represent a predetermined value. For example, aproximity sensor may determine or provide data that represents adistance which can vary continuously or nearly continuously in an analogfashion; in the case of such a proximity sensor, the distance maycorrespond to the intensity of reflected light which originated from theemitter of the proximity sensor. A temperature sensor may determine orprovide data that represents a temperature, which is an analog value. Alight sensor, such as an ambient light sensor, may determine or providedata that represents a light intensity which is an analog value. Amotion sensor, such as an accelerometer, may determine or provide datawhich represents a measurement of motion (e.g. velocity or accelerationor both). A gyroscope may determine or provide data which represents ameasurement of orientation (e.g. amount of pitch or yaw or roll). Asound sensor may determine or provide data which represents ameasurement of sound intensity. For other types of sensors, the datadetermined or provided by the sensor may represent an analog value.

FIG. 8 shows a diagram of various inputs from sensors that can be usedand actions that can be performed in accordance with at least oneembodiment of the invention. Any one of the devices described herein,including the devices shown in FIGS. 4A-4D and the peripheral 201 andthe data processing system 203, may operate in accordance with the useof artificial intelligence as represented by FIG. 8. One or more inputson the left side of FIG. 8 are received from various sensors of a deviceand are input into the artificial intelligence (AI) logic. One or moreactions on the right side of FIG. 8 may be implemented by the AI logicautomatically in response to any combination of the inputs. In oneimplementation of this embodiment, the actions are implementedsubstantially immediately after the data is sensed by one or moresensors.

Exemplary inputs of FIG. 8 may include, for example, proximity data,proximity data and blob detect data (e.g., from a multipoint touch inputscreen), proximity data and accelerometer data, accelerometer data andblob detect data, proximity data and temperature data, proximity dataand ambient light data, and numerous other possible combinations.

Exemplary actions of FIG. 8 may include, for example, enabling the audiosystem of one of a peripheral and a data processing system whiledisabling the other's audio system, turning off the backlight of theportable device's display, suppressing the user's ability to input atthe user interface (e.g., locking the input device), changing thetelephone's mode, and the like. It will be appreciated that combinationsof the above actions may also be implemented by the AI logic. Forexample, the AI logic may both turn off the display's backlight andsuppress the user's ability to input at the user interface.

AI logic of FIG. 8 performs an AI (artificial intelligence) process. Incertain embodiments, the AI process may be performed without a specific,intentional user input or without user inputs having predetermined dataassociated therewith (e.g., key inputs). The artificial intelligenceprocess performed by the AI logic of FIG. 8 may use a variety oftraditional AI logic processing, including pattern recognition and/orinterpretation of data. For example, the AI logic may receive data fromone or more sensors and compare the data to one or more threshold valuesand, based on those comparisons, determine how to interpret the data. Inone embodiment, a threshold value may represent a distance which iscompared to a value derived from a light intensity measurement in aproximity sensor. A light intensity measurement which represents adistance larger than the threshold value indicates that the object(which reflected the emitter's light) is not near, and a light intensitymeasurement which represents a distance smaller than the threshold valueindicates that the object is near. Further, the input data may besubject to at least two interpretations (e.g. the data from a proximitysensor indicates that the user's head is near to the sensor, so turn offthe back light, or the data from the proximity sensor indicates theuser's head is not near, so leave the backlight under the control of adisplay timer), and the AI process attempts to select from the at leasttwo interpretations to pick an interpretation that predicts a useractivity. In response to the interpretation (e.g. the selection of oneinterpretation), the AI logic causes an action to be performed asindicated in FIG. 8, wherein the action may modify one or more settingsof the device. In at least certain embodiments, the AI logic may performan AI process which interprets the data from one or more sensors (whichinterpretation requires the AI process to select between at least twopossible interpretations) and which selects an action (e.g. modifying asetting of the device) based on both the interpretation of the sensordata and the current state of the device (e.g. whether the user iscurrently communicating through the telephone in the device).

In certain embodiments, the AI process may perform traditional methodsof pattern recognition on the sensor data. For example, the rate ofchange of the distance between the device and the user's ear may have apattern (e.g. revealing a deceleration as the user moves the devicecloser to their ear), and this pattern in the rate of change of distancemay be detected by a pattern matching algorithm. The phrase “artificialintelligence” is used throughout to mean that a conclusion (whetherexplicit or implicit) can be drawn from data available from one or moresensors about a mode of usage by the user of the device. This conclusionmay or may not be expressed in the device (e.g., “the user is talking onthe phone”) but it will be mapped to specific actions or settings forthe device that would be appropriate if the user was using the device inthat way. For example, a telephone may be pre-programmed such thatwhenever it detects (1) a voice being spoken into the microphone, (2)that the phone is connected to a network, and (3) the proximity sensoris active, then the screen backlight will be dimmed. Suchpre-programming may involve simple logic (e.g. simple combinatoriallogic), but would nonetheless be within the scope of artificialintelligence as used herein. While learning, statistical analysis,iteration, and other complex aspects of AI can be used with the presentinvention, they are not required for the basic artificial intelligencecontemplated. Likewise, the word “analyze” does not imply sophisticatedstatistical or other analysis, but may involve observation of only asingle threshold or datum.

The AI processing, in at least certain embodiments, may be performed bya processor or processing system, such as digital processing system 103,which is coupled to the one or more sensors that provide the data whichform the inputs to the AI process.

In at least certain embodiments, the device, which operates according toany of the methods described herein, may have at least one input device(e.g. a keypad or keyboard or touch input panel) which is designed toreceive intentional user inputs (e.g. which specify a specific userentry) in addition to one or more sensors which are distinct andseparate from the at least one input device and which sensors are notdesigned to receive intentional user inputs. In fact, a user may noteven be aware of the presence of the one or more sensors on the device.

FIGS. 9A-C illustrate exemplary user activities that can be determinedbased on input data acquired by the one or more sensors of the portabledevice. Exemplary user activities include, but are not limited to, theuser looking directly at the portable device (FIG. 9A), the user holdingthe portable device at or near their ear (FIG. 9B), the user putting theportable device in a pocket or purse (FIG. 9C), and the like.

Additional information about user activities and/or gestures that can bemonitored in accordance with embodiments of the present invention aredisclosed in U.S. patent application Ser. No. 10/903,964, titled“GESTURES FOR TOUCH SENSITIVE INPUT DEVICES,” filed Jul. 30, 2004, U.S.patent application Ser. No. 11/038,590, titled “MODE-BASED GRAPHICALUSER INTERFACES FOR TOUCH SENSITIVE INPUT DEVICES,” filed Jan. 18, 2005,all of which are incorporated herein by reference in their entirety.

A method will now be described for automatically responding to certainuser activities with respect to a data processing system and/or aperipheral of the data processing system. This method includes, but isnot limited to, gathering sensor data designed to indicate user activitywith respect to a portable device and executing machine-executable codeto perform one or more predetermined automated actions in response tothe detection of the user activity, and this method may be performed byany one of the devices shown in FIGS. 4A-4D and the peripheral 201 andthe data processing system 203 and may or may not use the artificialintelligence process shown in FIG. 8. The sensor data is gathered fromone or more sensors; the sensor data provides information about useractivity or device context. For example, a proximity sensor may indicatewhether the device is near the user's ear; a temperature sensor, anambient light sensor (or a differential ambient light sensor) and aproximity sensor may together indicate that the device is in the user'spocket; a gyroscope and a proximity sensor may together indicate thatthe user is looking at the device. The data from the one or more sensorsis analyzed; this analysis may be performed by one or more processorswithin the device, including a processor within one or more of thesensors. The analysis attempts to predict user activity based on thesensor data. It will be appreciated that a prediction from this analysismay, in some cases, be wrong. For example, if a user places a fingerover a proximity sensor when the user holds the device, this may causethe analysis to incorrectly conclude that the device is near the user'shead or ear. After the analysis, one or more device settings may beadjusted based upon, at least in part, the analysis of the data from theone or more sensors. This adjusting may include changing an illuminationsetting of the device or other actions described herein.

Other examples of methods for sensing data and automatically respondingto the sensed data are provided in U.S. patent application Ser. No.11/586,862, filed on Oct. 24, 2006, and entitled “AUTOMATED RESPONSE TOAND SENSING OF USER ACTIVITY IN PORTABLE DEVICES,” which application isincorporated herein by reference. It will be appreciated that severalvariations can be made to the illustrated methods, including variationsto the data sensed, analysis of the data and the response(s) to thesensed data.

A mode of the device may be used in order to determine whether to or howto adjust a setting of the device. The mode of the device may includeany one of a variety of modes or conditions, such as speakerphone modeor non-speakerphone mode, battery powered mode or not battery poweredmode, call waiting mode or not call waiting mode, an alert mode in whichthe device may make a sound, such as the sound of an alarm, etc. Thedata relating to user activity (e.g. data from one or more sensors, suchas a proximity sensor and/or a touch input panel, which is capable ofdetecting blobs from a face) is analyzed relative to the mode of thedevice and the analysis attempts to determine whether to adjust asetting of the device. One or more device settings may be adjusted basedon the sensed user activity and the device mode. For example, the devicemay automatically switch from speakerphone mode to non-speakerphone modewhen proximity data, and optionally other data (e.g. data from a motionsensor and an ambient light sensor) indicate the user has placed thedevice, which in this case may be a telephone, next to the user's ear.In this example, the device has automatically switched from speakerphonemode to non-speakerphone mode without any intentional input from theuser which indicates that the switch should occur. Another methodinvolves adjusting an alert or alarm volume depending on whether or notthe device is near to the user's ear. In this example, if the datarelating to user activity indicates that the device is adjacent to theuser's ear and if the mode of the device is set such that alarms oralerts will cause the device to make a sound, then the device willautomatically change the volume level for an alert or an alarm from afirst level to a second level which is not as loud as the first level.

The phrase “proximity sensor” is used throughout to mean a sensor, suchas a capacitive, temperature, inductive, infrared or other variety ofsensor, which is capable of detecting whether an object is presentwithin a certain distance of the sensor. A primary object of thisdetecting may be the head of the user (or any other object that wouldpresent viewing of the display screen).

Any of the embodiments of the inventions may include one or more userinterface controls which allow a user to override a result caused by oneor more sensors. For example, a control, such as a button, may bepressed by the user to cause the display to return to full power after aproximity sensor has caused the display to enter a reduced powerconsumption state. In another example, the user interface control may bea sensor (or group of sensors), such as an accelerometer, which detectsa user interaction with the device (e.g. shaking the device), and theuser interaction has been set up to cause an overriding of a statecaused by one or more sensors.

Certain embodiments of the inventions may employ one or more lightsensors which provide data relating to light, which data is analyzed todetermine whether or not to adjust one or more settings of a device,such as wireless device 100. Ambient light level data may be provided byan ambient light sensor which indicates the level of light intensitysurrounding that sensor. Ambient light differential data may be obtainedfrom two or more ambient light sensors which are disposed at differentpositions on the device. For example, one ambient light sensor may be onone side of the device, and another ambient light sensor may be onanother side of the device. A different in the light intensity levelsmay be determined by comparing the data from these two ambient lightsensors on two different sides or surfaces of the device. There are avariety of possible uses of a light sensor. A light sensor may be usedwith a proximity sensor to deter mine when a device is placed in apocket to cause the device to be set in vibrate mode only or vibratemode with audible ringing. In another example, in response to a lightsensor determining that the ambient light is very low, and optionally inresponse to a user having set the device to visibly light up to show anincoming call when the ambient light is very low, the device mayautomatically be put in a “light ring” mode when it is dark so thatinstead of an audible ring from the device, the display flashes visibly(e.g. by repeatedly turning on and off the backlight) to indicate anincoming call. Another exemplary use of a light sensor involves using itas an alarm indicating that a dark room (or environment) has becomebrighter (e.g. the sun has risen or a door to a darkened room is openedto let light into the room). A light sensor may also be used to cause adevice to automatically act as a source of light (e.g. as a flashlight,in effect) upon sensing a low ambient light level.

FIG. 10 shows another example of a device according to an embodiment ofthe inventions. This device may include a processor, such asmicroprocessor 402, and a memory 404, which are coupled to each otherthrough a bus 406. The device 400 may optionally include a cache 408which is coupled to the microprocessor 402. This device may alsooptionally include a display controller and display device 410 which iscoupled to the other components through the bus 406. One or moreinput/output controllers 412 are also coupled to the bus 406 to providean interface for input/output devices 414 and to provide an interfacefor one or more sensors 416 which are for sensing user activity. The bus406 may include one or more buses connected to each other throughvarious bridges, controllers, and/or adapters as is well known in theart. The input/output devices 414 may include a keypad or keyboard or acursor control device such as a touch input panel. Furthermore, theinput/output devices 414 may include at least one network interfacewhich is either for a wired network or a wireless network (e.g. an RFtransceiver such as a WiFi or WPAN RF transceiver). The sensors 416 maybe any one of the sensors described herein including, for example, aproximity sensor or an ambient light sensor. In at least certainimplementations of the device 400, the microprocessor 402 may receivedata from one or more sensors 416 and may perform the analysis of thatdata in the manner described herein. For example, the data may beanalyzed through an artificial intelligence process or in the other waysdescribed herein. As a result of that analysis, the microprocessor 402may then automatically cause an adjustment in one or more settings ofthe device.

FIGS. 11-16 relate to another aspect of the inventions described herein.In this aspect, the data processing system 203 may be considered itselfa peripheral relative to another data processing system such as the dataprocessing system 451 which may, in at least certain embodiments, be ageneral purpose computer system such as the system shown in FIG. 10. Thesystem 450 shown in FIG. 11 includes the data processing system 451which includes a network interface and a peripheral interface andstorage. In at least certain embodiments, the data processing system 451may be a general purpose computer system having a keyboard, and a cursorcontrol device, and a display as well as a network interface to couplethe data processing system to a network 459 which may be the Internet orother networks, such as a local area network or a telephone network or acable TV system network. The network interface may connect to thenetwork either through a wired connection or through a wirelessconnection and there may be a plurality of network interfaces fordifferent networks or different methods of connecting to the samenetwork or a plurality of networks. The data processing system typicallyincludes non-volatile mass storage which may store user programs and anoperating system and user data including address or contact information,calendar information, and URLs such as favorites or bookmarks forbrowsing the Internet. The peripheral interface of the data processingsystem 451 is used to couple the data processing system 451 to a dock orother connector for peripherals. The dock or other connector may beconnected in a wired or wireless manner to the data processing system451 through the peripheral interface. The dock or connector 453 isdesigned to connect to one or more peripherals, such as a firstperipheral 457 which may be a wireless headset and a second peripheral455 which may be a wireless cellular telephone which includes PDAfunctionality. In one embodiment, the data processing system 203 may bethe second peripheral 455 and the peripheral 201 may be the firstperipheral 457. The dock may mechanically hold both peripheralsseparately or at the same time and may also electrically connect to bothperipherals to provide power to the peripherals, recharge the batteriesof the peripherals, and to exchange data between the peripherals and thedata processing system 451. The second peripheral 455 may includestorage for user information, such as contacts, calendar, and URLs,which may be synchronized with the user's data of a similar type on thedata processing system 451. The user may place one or both peripheralson the dock or connector 453 to cause certain actions to occur asdescribed herein or may remove one or both peripherals to also causecertain actions to occur automatically as described herein. The dockand/or peripherals may include mechanical or electrical sensors todetect the placement of the peripheral on the dock or connector and theremoval of the peripheral from the dock or connector.

FIG. 12 shows an example of a method of operating the system 450. Inthis example, the first peripheral 457 is unnecessary, although it maybe present and attached to the dock 453. In operation 471, the dataprocessing system, such as the data processing system 451, receives acommunication. This communication may be a voice over IP (VOIP) phonecall through a network, such as the network 459, which may be theInternet. Alternatively, the communication may be an instant message oran email through the network 459. This communication is received throughthe network interface of the data processing system, such as the networkinterface of the data processing system 451. In operation 473, which isoptional, the data processing system causes the generation of an alert.For example, the data processing system may cause the generation of atelephone's ringing sound. In operation 475, the system determineswhether a wireless telephone peripheral, such as a wireless cellulartelephone, which may be the second peripheral 455, has been activated ordisconnected from the dock during the communication. This determinationmay occur through detecting that the second peripheral 455 has beenremoved from the dock or it may be determined through sensors on thesecond peripheral, such as proximity sensors and accelerometers andother sensors. The system may detect that the user has picked up thesecond peripheral 455 during the generation of the ringing sound orafter the phone call has began and the ringing sound has stopped. In oneembodiment, the routing operation shown in operation 477 may be invokedat any time during the communication, including after the ringing soundhas ceased to be generated, or only during the generation of the ringingsound. In operation 477, the data from the communication, such as theaudio data of the phone call, is routed through the wireless phoneperipheral, such as the second peripheral 455, if the user has activatedor picked up the phone during the communication. Otherwise, if the userdoes not pick up the phone during the communication, the data is routedthrough the user interface system of the data processing system, whichmay be speakers and a microphone as part of the input/output devices ofthe data processing system 451. It will be appreciated that in certainembodiments, the system may reverse the routing of data when the secondperipheral 455 is placed back on the dock during the communication. Itwill be appreciated that the routing of data in operation 477 may beperformed through a WiFi or WPAN interface on both the second peripheral455 and the data processing system 451. This would enable the secondperipheral 455 to still be able to use its wireless cellular transceiverfor a telephone call over the wireless cellular network.

FIG. 13 shows another method which may be employed with the system 450of FIG. 11. In this method, it is assumed that both the first peripheral457 and the second peripheral 455 are coupled or connected to the dockor connector 453. In operation 490, the second peripheral, which may bea wireless cellular telephone with PDA functionality, receives acommunication, such as a cellular telephone call, while being docked orotherwise connected to the data processing system, such as the dataprocessing system 451. In operation 492, it is determined whether theuser has removed a first peripheral, such as the first peripheral 457,from a dock or connector, such as the dock or connector 453, while thecommunication is being received. Then in operation 494, the data of thecommunication is routed through the first peripheral in response todetermining that the user has removed the first peripheral, which may bea wireless headset, from the dock or connector. This will typicallycause the speaker and microphone of the second peripheral 455 to bedisabled so that the audio data of the phone call is provided onlythrough the wireless headset or first peripheral 457. It will beappreciated that in certain embodiments, the routing of data may bereversed when the first peripheral is returned to the dock.

FIG. 14 shows another method of operating the system 450 shown in FIG.11. In this case, it is assumed that the user is already communicatingthrough a device, such as a wireless cellular telephone, which may bethe second peripheral 455 before the method begins. In operation 501, itis determined that the user has placed the device on a dock or otherconnector of the data processing system while the user is communicatingthrough the device. For example, operation 501 may determine that thesecond peripheral 455 has been placed on the dock or connected to aconnector 453 while the user is in the process of communicating throughthe second peripheral. This communication may be a telephone callthrough a wireless cellular network using the second peripheral 455 as awireless cellular telephone. Operation 503, in response to determiningthat the user has placed the device on the dock, either puts thecommunication on hold or routes the communication through the userinterface of the data processing system, such as the data processingsystem 451. It will be appreciated that a reverse operation may occurfollowing operation 503 in which the routing of the communication isreturned to the cellular telephone. For example, following operation503, the user may remove the cellular telephone from the dock and causethe communication to be routed back to the second peripheral 455 and tono longer use the speaker and microphone of the data processing system,such as the data processing system 451.

FIG. 15 shows another example of a method of operating the system 450.In operation 515, a telephone call is received by a data processingsystem, such as the data processing system 451, which generates analert, such as a ringing sound that the call is incoming. In oneembodiment, the data processing system 451 may include a computerprogram and the necessary hardware to provide voice over IP (VOIP)functionality on the data processing system which can receive and makevoice over IP phone calls through the data processing system. Inoperation 517, the system determines whether the user has removed thefirst peripheral 457, which may be a wireless headset from the dock orother connector of the data processing system during the phone call,such as while the alert is being generated or, in certain embodiments,during the phone call after the alert has been generated. If the systemdetermines that the user has removed the wireless headset from the dock,then in operation 519, data from the phone call is routed through thewireless headset, rather than the speakers and microphone of the dataprocessing system 451 in response to deter wining that the user hasremoved the wireless headset from the dock during the phone call.

It will be appreciated that in at least certain embodiments, a userinterface of a data processing system, such as the data processingsystem 451, may allow a user to set preferences or configurationparameters for a phone, such as the second peripheral 455 which may beused with the data processing system 451. FIG. 16 shows an example of auser interface which may be displayed on a display device of the dataprocessing system 451. This user interface includes a window 525 whichincludes several possible preferences or options which can be set or notset by the user. If the user selects check box 531, then operation 503shown in FIG. 14 will put the phone call on hold while the phone isplaced on the dock if the user had been using the phone before placingthe phone on the dock. If the user selects check box 533, then cheek box531 becomes automatically unselected and the operation 503 causes theaudio from the phone call to be routed through the audio system of thedata processing system 451. Check box 535 allows a user to cause thesystem 450 to route audio of a VOIP phone call, received or initiated onthe data processing system 451, through the audio system (e.g. speakerand microphone) of the second peripheral 455, which may be a wirelesscellular telephone of the form shown as data processing system 203 inFIG. 1, in response to picking up the second peripheral from the dockduring the VOIP phone call. Selecting check box 535 enables thisfunctionality which is also shown in FIG. 12; FIG. 16 shows that checkbox 535 has been selected. If the user selects check box 537 (shown asunselected in FIG. 16), then the system 450 will put a VOIP phone callon the headset when the user picks up the headset from the dock whilethe phone is ringing. check box 539 allows a user to cause the user'sdata (e.g. contact, calendar data, URLs such as bookmarks, etc.) on thephone (e.g. the second peripheral 455) to be synchronized with theuser's similar data on the data processing system (e.g. system 451)automatically in response to the phone being placed on the dock if thecheck box 539 is selected; if the check box 539 is not selected, thissynchronization may be performed manually by the user selecting asynchronization command.

As described herein, the data processing system of FIG. 1 may be acommunications device that incorporates telephone capabilities withother audio functions, such as a music player, and interacts withvarious types of external audio devices (peripherals), such as wirelessaudio headsets. Other audio devices may be internal to thecommunications device, such as an earpiece and a speaker. When externalaudio devices are connected, the communications device will determinethe device to which to route the audio. The communications device alsowill display screens to the user so the user can select the audio deviceto use when an audio application is initiated or is executing. Suchaudio applications may process audio signals from an internal source,such as a music file or internally stored voice mails, or from anexternal source, such as a phone call or externally stored voice mails.It will be appreciated that the user interface described herein may alsobe implemented on any electronic device with audio capabilities.

FIGS. 17A and 17B illustrate alternate embodiments of an applicationcontrol screen 1701 and 1703 displayed to a user while a correspondingapplication is executing on a communications device. Application controlscreen 1701 contains a set of objects, shown as buttons, that representfunctions for the audio application, one of which is an audio routingbutton 1709. As illustrated, audio routing button 1709 includes an icon1711 and text 1713. As shown, the icon 1717 is a speaker and the text1713 is the word “speaker”. Other buttons on the application controlscreen 1701 may include icons. Button 1709 is a routing toggle button,in that when a user presses the toggle button 1709, the audio routingicon is highlighted to indicate that the audio is being routed to thespeaker. When the user presses the toggle button 1709 again, thehighlight is removed to indicate that the audio is being routed toanother internal audio device, such as an earpiece. When external audiodevices are attached to the communications device, the applicationcontrol screen 1703 is presented. As illustrated, the routing button haschanged to a routing menu button 1715 and includes an additional icon1715, shown as a Bluetooth Icon®. The text 1713 for button 1715 is alsochanged to “audio source”. When the user presses the routing menu button1715, an audio routing screen appears, such as screens 1705 and 1707illustrated in FIGS. 17C and 17D. In one embodiment, the applicationcontrol screen is animated so that it appears to “flip over” to displaythe audio routing screen as the back of the application control screen.In one embodiment, the flip animation is implemented as described inU.S. Pat. No. 5,351,995 titled “DOUBLE-SIDED, REVERSIBLE ELECTRONICPAPER” issued on Oct. 4, 2004 to the assignee of the presentapplication, and which is herein incorporated by reference.

In the embodiment of FIG. 17C, the routing screen 1705 has threebuttons: a Bluetooth headset button 1719, an earpiece button 1721, and aspeakerphone button 1723. The currently selected device is indicatedwith an icon 1725, illustrated as a speaker in FIG. 17C. Othermechanisms for visually indicating which device is currently active willbe readily apparent. In an alternate embodiment, when there are too manyavailable devices to be displayed as buttons, routing screen 1707containing a list of devices is presented as shown in FIG. 17D, with thecurrently selected device visually highlighted in some fashion. Therouting screen 1707 may be scrollable to show more devices if the listis too long to display in the routing screen 1707. As described below,the routing screen is dynamic and changes as external devices connectand disconnect from the communications device. In one embodiment, therouting screen 1705 or 1707 is displayed for a certain period of time,such as five seconds, and will flip over to the application controlscreen when the time period expires. If a user selects an audio devicefrom the list before the time period expires, the routing screen willremain on the screen for another period of time, such as another fiveseconds, before flipping over to the application control screen.

FIG. 18 illustrates a user interface (UI) application 1801 that presentsthe screens of FIGS. 17A-D. In one embodiment, the UI application 1801is integrated into an audio application, such as a music player orvoicemail. In an alternate embodiment, the UI application 1801 is acommon component that can be invoked by the audio applications todisplay the screens. As illustrated, the UI application 1801 is coupledto an audio routing module 1802 that routes audio signals to theselected audio device. An audio device manager framework 1803 managesconnections with external audio devices, such as car 1809 and headset1810. As illustrated, the audio device manager framework 1803 containstwo services: a Bluetooth service 1805 and an additional protocolservice 1807. When an external audio device is activated or deactivated,the audio device manager framework 1803 invokes the appropriate serviceto handle the device and notifies the audio routing module 1802 of astatus change in an external device. The audio routing module 1802 inturn sends a notification to the UI application 1801 that an externaldevice connection has been added or dropped. As a result of receivingthe notification, the UI application 1801 presents the applicationcontrol and audio routing screens described above. When a user selectsan audio device, either by pressing in the routing toggle button 1709 inFIG. 17A, by pressing one of the buttons on routing screen 1705, or bytapping on one of the devices in the list shown in 1707, the UIapplication 1801 notifies the audio routing module 1802 which device isnow currently selected so that the audio routing module 1802 may routethe audio to the correct device. In some circumstances, the UIapplication 1801 may also communicate the device selection to the audiodevice manager framework 1803.

FIGS. 19 through 21 illustrate exemplary embodiments of methodsperformed by the UI application 1801 to present the screens and send thenotifications previously described. Starting with FIG. 19, oneembodiment of an initialize audio application method 1900 is described.When an audio application is initiated on the device, the UI application1801 determines the connected audio devices at block 1901. Thedetermination may be based on a list updated by the UI application 1801when it receives notification that an external audio device has beenadded or dropped. In an alternate embodiment, at block 1901, the UIapplication 1801 also determines which audio devices are appropriate forthe audio application. For example, if the audio application is musicand one of the external audio devices is a monographic headset, the UIapplication 1801 may exclude the mono headset. In another embodiment,the connected devices includes audio devices that are not currentlyconnected but that can be connected to with reasonable certainty.

If there are no external audio devices (block 1903), at block 1905 themethod 1900 displays an application control screen with a routing togglebutton, such as screen 1701, and the audio routing module 1802 uses thedefault internal routing audio device unless the user presses therouting toggle button as described below. If there are external devices,at block 1903 the method 1900 displays a routing screen, such as therouting screens 1705 and 1707. The method 1900 waits for a period oftime for user input (block 1909). In one embodiment, the wait time isapproximately five seconds. If the user presses a button on the routingscreen, the notification of the user's choice of audio devices is sentto the audio routing module at block 1911. If no user input is receivedduring the wait time period, the method 1900 displays an applicationcontrol screen with the routing menu button, such screen 1703, at block1913. Additionally, if the user does not press a button on the routingscreen, the audio routing module 1802 will route audio to a defaultaudio device, such as the last device used or a predefined internaldevice.

In an alternate embodiment, if the application is initiated by anexternal device, such as when a user answers an incoming phone callusing a headset, the audio routing module 1802 routes the audio to theinitiating external device and the method 1900 proceeds from block 1901to block 1913 to display the application control screen with the routingmenu button.

Turning now to FIG. 20, a routing button press method 2000 is described.If user has pressed the routing button when it is a routing togglebutton (block 2001), the method 2000 sends a notification to the audiorouting module 1802 to switch the routing to the other internal deviceat block 2003. Otherwise, the method 2000 displays the routing screen tothe user at block 2005. In described above in conjunction with thesimilar blocks of FIG. 19, the method 2000 waits for user input at block2007, sends a notification if the user selects a device at block 2009,and displays the application control screen with a routing menu blockbutton at block 2011.

FIG. 21 illustrates a method 2100 performed by the UI application whenit receives notification that a new external device has been added ordropped while an audio application is executing. If the notification isthat a new external device is being added (block 2101), the method 2100determines the connected audio devices at block 2103, as previouslydescribed. In an alternate embodiment shown in phantom, if the method2100 determines there are no appropriate external audio devices (block2105), the method 2100 displays the application control screen with therouting toggle button at block 2107. If the optional processingrepresented blocks 2103 and 2105 is not implemented, the method 2100proceeds to block 2109 where it displays a routing screen. The method2100 waits for user input at block 2111, sends any notification of userchoice at 2113, and displays the application control screen with therouting menu button at block 2115, as described in more detail above inconjunction with FIG. 19. In yet another embodiment, the audio routingmodule 1802 automatically switches the audio to the newly connectedexternal audio device and the method 2100 proceeds from block 2103 toblock 2115 to display the application control screen with the routingmenu button.

Returning now to block 2101, if the method 2100 receives notificationthat an external audio device is being dropped, the method 2100determines if the drop notification is for the currently selected device(block 2117). If so, the method 2100 also receives a notification thataudio is being routed to the default device (block 2119). In eithercase, the method 2100 determines if there are any external audio devicesconnected (block 2121). If so, the method 2100 displays the applicationcontrol screen with a routing menu button at block 2115. If the devicethat was dropped is the last connected external device, the method 2100displays the application control screen with the routing toggle buttonat block 2123.

In the foregoing specification, the invention has been described withreference to specific exemplary embodiments thereof. It will be evidentthat various modifications may be made thereto without departing fromthe broader spirit and scope of the invention as set forth in thefollowing claims. The specification and drawings are, accordingly, to beregarded in an illustrative sense rather than a restrictive sense.

1-20. (canceled)
 21. A method comprising: receiving data about a stateof a data processing system from a first sensor; receiving data about astate of a peripheral from a second sensor, the peripheral in datacommunication with the data processing system; determining that aconfiguration of the data processing system is to be changed based onthe data received from the first sensor and the data received from thesecond sensor; and changing the configuration of the data processingsystem in response to determining that the configuration of the dataprocessing system is to be changed.
 22. The method of claim 21, whereinthe first sensor is located at either the data processing system or theperipheral.
 23. The method of claim 21, wherein the second sensor islocated at either the data processing system or the peripheral.
 24. Themethod of claim 21, further comprising: determining that a configurationof the peripheral is to be changed based on the data received from thefirst sensor and the data received from the second sensor; and changingthe configuration of the peripheral in response to determining that theconfiguration of the peripheral is to be changed.
 25. The method ofclaim 21, wherein the configuration of the data processing system thatis to be changed is either enabling functionality or disablingfunctionality.
 26. The method of claim 21, wherein the first sensorcomprises at least one of a proximity sensor, an ambient light sensor oran accelerometer.
 27. The method of claim 21, wherein the second sensorcomprises at least one of a proximity sensor, an ambient light sensor ora microphone.
 28. The method of claim 21, wherein the data processingsystem is a mobile telephone, wherein the peripheral is a wirelessheadset, wherein the data about the state of the mobile telephoneindicates that the mobile telephone is near a user's ear, wherein thedata about the state of the wireless headset indicates that the wirelessheadset is not proximate the user, and wherein changing theconfiguration of the mobile telephone comprises: enabling a speaker anda microphone of the mobile telephone; and disabling a speaker and amicrophone of the wireless headset.
 29. A non-transitorycomputer-readable medium storing instructions executable by dataprocessing apparatus to perform operations comprising: receiving dataabout a state of a data processing system from a first sensor; receivingdata about a state of a peripheral from a second sensor, the peripheralin data communication with the data processing system; determining thata configuration of the data processing system is to be changed based onthe data received from the first sensor and the data received from thesecond sensor; and changing the configuration of the data processingsystem in response to determining that the configuration of the dataprocessing system is to be changed.
 30. The medium of claim 29, whereinthe first sensor is located at either the data processing system or theperipheral.
 31. The medium of claim 29, wherein the second sensor islocated at either the data processing system or the peripheral.
 32. Themedium of claim 29, the operations further comprising: determining thata configuration of the peripheral is to be changed based on the datareceived from the first sensor and the data received from the secondsensor; and changing the configuration of the peripheral in response todetermining that the configuration of the peripheral is to be changed.33. The medium of claim 29, wherein the configuration of the dataprocessing system that is to be changed is either enabling functionalityor disabling functionality.
 34. The medium of claim 29, wherein thefirst sensor comprises at least one of a proximity sensor, an ambientlight sensor or an accelerometer.
 35. The medium of claim 29, whereinthe second sensor comprises at least one of a proximity sensor, anambient light sensor or a microphone.
 36. The medium of claim 29,wherein the data processing system is a mobile telephone, wherein theperipheral is a wireless headset, wherein the data about the state ofthe mobile telephone indicates that the mobile telephone is near auser's ear, wherein the data about the state of the wireless headsetindicates that the wireless headset is not proximate the user, andwherein changing the configuration of the mobile telephone comprises:enabling a speaker and a microphone of the mobile telephone; anddisabling a speaker and a microphone of the wireless headset.
 37. Amobile telephone comprising: one or more computers; and acomputer-readable medium storing instructions executable by the one ormore computers to perform operations comprising: receiving data about astate of the mobile telephone from a first sensor, wherein the firstsensor comprises at least one of a proximity sensor, an ambient lightsensor or an accelerometer; receiving data about a state of a wirelessheadset in data communication with the mobile telephone from a secondsensor located on the wireless headset, wherein the second sensorcomprises at least one of a proximity sensor, an ambient light sensor ora microphone; determining that a mobile telephone speaker and a mobiletelephone microphone are to be enabled based on the data received fromthe first sensor and the data received from the second sensor; andenabling the mobile telephone speaker and the mobile telephonemicrophone in response to determining that the mobile telephone speakerand the mobile telephone microphone are to be enabled.
 38. The mobiletelephone of claim 37, wherein the first sensor is located at either themobile telephone or the wireless headset.
 39. The mobile telephone ofclaim 37, wherein the second sensor is located at either the mobiletelephone or the wireless headset.
 40. The mobile telephone of claim 37,the operations further comprising: determining that a wireless headsetspeaker and a wireless headset microphone are to be disabled based onthe data received from the first sensor and the data received from thesecond sensor; and disabling the wireless headset speaker and thewireless headset microphone in response to determining that the wirelessheadset speaker and the wireless headset microphone are to be disabled.